<style>
.content-group {background:#fff;border-radius: 0.5rem;margin-bottom:0.39rem}
.fui-tab-scroll .item.on:before {background:linear-gradient(to right,rgba(99,190,114,1),rgba(99,190,114,0));}
</style>
<div class="fui-page shop-index-page" style="display:block;">
    <div class="fui-content" style="padding-bottom:4rem">
		<div style="padding:0">
		<div class="fui-cell-group fui-cell-click" style="margin-top: 0;margin-bottom:0.2rem">
			<div class="fui-searchbar bar" style="background:none;z-index: 0;">
					<div ng-class="{'searchbar':1,'searchbar-active':pagedata.searchbar ==1}" style="background:none">
							<div style="position: relative;left:0;top:0;">
								<div class="search-input" style="">
									<i id="searchsub" class="icon icon-sousuo1"  ng-click="tool.get_list('jy_onlineedu/index/getlist/',true)"></i>
									<input type="search" placeholder="搜索课程" class="search" ng-model="pagedata.params.keyword" style="text-align: left; color: #999; font-size:0.6rem;background:#f9f9f9;border-radius: 1rem;" />
								</div>
							</div>
					</div>
			</div>
			<div class="fui-tab-scroll" ng-if="pagedata.groups.length>0">
				<div ng-class="{'item':1,'on':pagedata.params.groupid==0}" style="height:2rem;line-height:1.5rem"><a href="javascript:;" ng-click="pagedata.params.groupid=0;tool.get_list('jy_onlineedu/index/getlist/',true)">推荐</a></div>
				<div ng-repeat="tab in pagedata.groups" style="height:2rem;line-height:1.5rem" ng-class="{'item':1,'on':pagedata.params.groupid==tab.id}"><a href="javascript:;" ng-click="pagedata.params.groupid=tab.id;tool.get_list('jy_onlineedu/index/getlist/groupid='+tab.id,true)">{{tab.title}}</a></div>
			</div>
		</div>
		<div ng-if="pagedata.list" class="fui-goods-group block">
			<div ng-include="sys_html('_videolist')"></div>
		</div>
		</div>
		<div ng-if="pagedata.loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
	</div>
</div>
<div ng-if="pagedata.showewm" class="popup">
	<div class="popup-body">
		<div class="popup-bottom">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showewm=false"></i>
			<div class="fui-icon-group noborder col-5" style="padding-top:0.5rem">
				 <div class="fui-list">
					<div class="fui-card" style="margin-left:auto;margin-right:auto;padding-top:0;border-radius:0.5rem">
						<img style="width:8rem;height:8rem;border-radius:0.5rem" src="{{tomedia(pagedata.showitem.ewm) || '../addons/jy_onlineedu/resource/img/code.png'}}"  />
					</div>
				</div>
				<div class="fui-line-title">
					<div class="text text-danger bold" style="margin-bottom: -8px;">———— *  <span style=";font-size:13px">微信扫上面二维码</span> * ————</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.pagedata.setshowewm=function(item){
	scope.post_json('/index/looklog/id='+item.id,{},function(res){
		if(res=='success'){
			
		}
	});
}
/*var browserRule = /^.*((iPhone)|(iPad)|(Safari))+.*$/;
if (browserRule.test(navigator.userAgent)) {
        window.onpageshow = function(event) {
            if (event.persisted) {
                window.location.reload()
            }
        };
}*/
require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
});
//信息弹窗：
//前端先注册以等待接收消息
require(['jinyun_socket'],function(jinyun_socket){
    jinyun_socket.connect();
    jinyun_socket.onsystem=function(res){
        if(res.message){
			var success_title = '确认';
			if(res.url){
				success_title = '前往查看';
			}
			scope.confirm({
						'message':res.message,
						'success':res.url,
						'success_title':success_title
			});
		}
    }
});
//滚动加载
scope.tool.get_list('jy_onlineedu/index/getlist/isvideo=1',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_onlineedu/index/getlist/isvideo=1');
}
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>